<template>
    <div>
        <RoleAddEditDialog ref="addEditDialogRef">

        </RoleAddEditDialog>
        <ElButton @click="openAddEditDialog(undefined)">add dialog</ElButton>
        <ElButton @click="openAddEditDialog(13)">edit dialog</ElButton>
    </div>
</template>
<script setup lang='ts'>
import { onMounted, ref } from 'vue';
import RoleAddEditDialog from './role_add_edit_dialog.vue'
    ////#region defineXxx
    //defineOptions({
        //name:
    //});

    //const props=defineProps({
        //propA:{
            //type:String,
            //required:true
        //},
        //propB:{
            //type:Number,
            //default:1
        //},
        //propC:{
            //type:String as PropType<MyType>,
            //required:true
        //},
    //});

    //const emit = defineEmits<{
        //event1:[para1:number,para2:string],
        //event2:[para1:number,para2:string],
    //}>();
    ////#endregion

    const addEditDialogRef=ref();
    onMounted(()=>{
        // addEditDialogRef.value.openDialog();
    })
    function openAddEditDialog(id?:number){
        addEditDialogRef.value.openDialog(id)
    }
    
</script>
<style lang='scss' scoped>
    
</style>